// 1. 导入fs模块
const fs = require('fs');

const path = require('path');


let url = path.resolve(__dirname,'../视频/01-nodeJs介绍.mp4'); 

console.log(url);

// 2. 创建一个流式读取对象
let rs =  fs.createReadStream(url);

// 3. 读取过程
rs.on('data',(chunk)=>{
    console.log(chunk);//65486
})

// 4. 读取结束
rs.on('end',()=>{
    console.log("读取完成");
});

